package com.itheima.chapter01.Repository;

import com.itheima.chapter01.Bean.Person;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.CrudRepository;

import java.util.List;
//此接口于测试Spring Boot与Redis数据库的整合测试
public interface PersonRepository extends CrudRepository<Person,String> {
    List<Person> findByLastname(String lastname);
    Page<Person> findPersonByLastname(String lastname, Pageable page);
    List<Person> findByFirstnameAndLastname(String firstname,String lastname);
    List<Person> findByAddress_City(String city);
    List<Person> findByFamilyList_Username(String username);
}
